/**
 * Created by wang on 2016-7-19.
 */
define(function () {
    'use strict';

    function ctrl($scope,WebService) {

        $scope.$on('$ionicView.loaded', function() {
            init();
        });

        function init(){
            WebService.wtAd("xcm_preview").then(function(data){
                $scope.ad = (data && data.length > 0) ? data[0] : null;
            });
        }
    }

    ctrl.$inject = ['$scope','WebService'];
    return ctrl;
});